/**
 * 
 */
package arisufascion.com.db;

import android.content.Context;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;

/**
 * @author Kelvin
 *
 */
public class MySharePreferences {
	public static final String KEY_ARISUFASCION = "key_arisufascion";
	public static final String LOGIN = "login";
	public static final String CUSTOMER_COMMENT = "customer_comment";
	// ==========================Points==============================
			public static boolean saveLogin(boolean login, Context context) {
				Editor editor = context.getSharedPreferences(KEY_ARISUFASCION,
						Context.MODE_PRIVATE).edit();
				
				editor.putBoolean(LOGIN, login);
				
				return editor.commit();
			}

			public static boolean getLogin(Context context) {
				SharedPreferences session = context.getSharedPreferences(KEY_ARISUFASCION,
						Context.MODE_PRIVATE);
				return session.getBoolean(LOGIN, false);
			}
			
			// ==========================CUSTOMER_COMMENT==============================
			public static boolean saveCustomerComment(String customer_comment, Context context) {
				Editor editor = context.getSharedPreferences(KEY_ARISUFASCION,
						Context.MODE_PRIVATE).edit();
				
				editor.putString(CUSTOMER_COMMENT, customer_comment);
				
				return editor.commit();
			}

			public static String getCustomerComment(Context context) {
				SharedPreferences session = context.getSharedPreferences(KEY_ARISUFASCION,
						Context.MODE_PRIVATE);
				return session.getString(CUSTOMER_COMMENT, null);
			}

}
